The present disclosure relates to computer systems, and, in particular, to methods, systems, and computer program products for managing computer system databases.
Information Management System (IMS) is a database system that is used with IBM computer systems. IMS comprises a hierarchical database and an online transaction processing systems. Database types may include relational and hierarchical. Relational databases comprise tables that relate to other tables based on specific columns. Examples of relational databases include DB2, Oracle, MySQL, and PostgreSQL. IMS is an example of a hierarchical database. An IMS database is made up of segments that are arranged in a hierarchical order similar to, for example, the arrangement of information in an XML file.
In an IMS database, the topmost segment is called the root segment with information relevant to the root segment being stored in child segments. For example, a business that employs multiple sales persons may create an IMS database to store information about the sales team. The top most segment in the IMS database may include information about each sales person including name, address, phone number, email address, etc. A second level of segments may be defined for the various clients that the sales person serves. A third level of segments may be defined for each client that lists the transactions, e.g., sales, returns, orders, etc. associated with that client. Thus, the transaction segments are children segments of the client segments, which are children of the sales personnel segments.
IMS uses a set of constructs known as a database definition (DBD), a program specification block (PSB), and an access control block (ACB) to allow application programs to use a database.
In relational databases, tables are created using SQL statements. IMS uses a DBD to define the type of database, all segments and fields, and any logical relationships or indexing. A database administrator codes a set of assembler macros that are processed by a DBDGEN utility to generate a DBD control block. The DBD control block is then stored in a DBD library. IMS uses the DBD control block to determine the physical structure of the database.
In relational databases, views can be restricted to columns within tables by creating logical views. IMS uses a PSB to create logical views within a database. The PSB specifies all databases that an application can access, which segments in the database(s) that the application program is sensitive to, and how the application program can use the segments, e.g., inquiry or update. Similar to a DBD, a database administrator codes a set of assembler macros that are processed by a PSBGEN utility to generate a PSB control block. The PSB control block is then stored in a PSB library. A PSB may contain one or more program control blocks (PCBs). A PCB is defined for each database accessed by an application program and specifies the segments to which the application program can have access and the processing authorization for each segment.
FIG. 1 illustrates the logical relationship between an application program and an IMS database. As shown in FIG. 1, the application program 105 specifies the PSB 110, which is used to access two databases through PCB1 115a and PCB2 115a. The two DBDs-DBD1 120a and DBD2 120b—are used to define databases DB1 125a and DB2 125b, respectively. Application control blocks (ACBs) are created by merging information from PSBs and DBDs. The application program 105 uses the ACBs during execution. For online applications, ACBs are prebuilt using the ACB maintenance utility ACBGEN. For batch applications, it is not required that the ACBs be prebuilt, but it may nevertheless be desirable to prebuild the ACBs as prebuilt ACBs require less time to schedule an application program and use less storage.